﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sunboxsoft.WinForm;
using DevExpress.XtraEditors;
namespace Sunboxsoft.ASMS.Client.UI.Common.Validations
{
    public class SearchLookUpEditValidation : IValidation
    {
        SearchLookUpEdit _searchLookUpEdit;
        private string _strMess;
        public SearchLookUpEditValidation(SearchLookUpEdit searchLookUpEdit, string strMess)
        {
            _searchLookUpEdit = searchLookUpEdit;
            _strMess = strMess;
        }
        public bool Validate(out string message)
        {
            if (_searchLookUpEdit.EditValue == null)
            {
                message = string.Format("请选择{0}！", _strMess);
                return false;
            }
            else
            {
                message = null;
                return true;
            }
        }
    }
}
